home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 July / EnigmA AMIGA RUN 09 (1996)(G.R. Edizioni)(IT)[!][issue 1996-07 & 08][EARSAN CD VIII].iso / earcd / gui / mpgui50s.lha / smakefile < prev   
Makefile  |  1996-05-08  |  6KB  |  193 lines

  1. # MPGui - Amiga Guis from Text Files
  2. # Copyright (C) © 1995 Mark John Paddock
  3.  
  4. # $VER: MPGui_smakefile 5.0 (6.5.96)
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # mpaddock@cix.compulink.co.uk
  21. # mark@topic.demon.co.uk
  22.  
  23. # Make file for MPGui and SAS/C 6.56
  24.  
  25. # various defines
  26. OS        = sC/
  27. PS        = sP/
  28. PA        = $(PS)a/
  29. DS        = sD/
  30. GS        = sG/
  31. R         = Rexx/
  32. I         = .info
  33. G         = Gui/
  34. D         = docs/
  35. INC       = include/
  36. DE        = Demo/
  37.  
  38. # Compilation flags
  39. # Normal compile
  40. NORMFLAGS  = PARM=R CONSTLIB NOSTKCHK STRMER UCHAR STREQ OPT OPTGO\
  41.  CNEST NOMINC STRCONS VERBOSE STRSECT=CODE NOCHKABORT\
  42.  DBG=L WARN=ALL ERR=ALL IGN=104,51,148,190,61,165,120,212,112 IDIR=$(INC)
  43. # Compile math = FFP 000
  44. CCFLAGS000 = $(NORMFLAGS) CPU=ANY MATH=FFP OPTSIZE
  45. # Compile MPGui.library
  46. CCFLAGSLG000= $(CCFLAGS000) LIBCODE
  47.  
  48. # default compilation
  49. .c.o:
  50.    sc $(CCFLAGS000) $*.c
  51.  
  52. .asm.o:
  53.     asm -d $*.asm
  54.  
  55. IGDIST    = $(INC)libraries/MPGui.h $(INC)clib/MPGui_protos.h $(INC)pragmas/MPGui_pragmas.h
  56.  
  57. DGDIST    = $(D)MPGui.doc
  58.  
  59. MPGUIDIST = $(IGDIST) $(DGDIST) MPGui.library RunMPGui $(GS)RunMPGui.c $(OS)sprintf.c $(DE)SnoopDos-prefs $(DE)SnoopDos-prefs$(I) Demo$(I)\
  60.  EditPrefs $(G)SnoopDos.def $(G)SnoopDos.gui $(G)Test.gui $(DE)Test $(DE)Test$(I) EditPrefs-rexx EditPrefs.guide\
  61.  MPGui.guide MPGui.guide$(I) COPYING
  62.  
  63. COMMONSRC = $(OS)sprintf.c
  64.  
  65. DOCSRC    = COPYING smakefile $(DS)EditPrefs.texi $(DS)MPGui.texi
  66.  
  67. EMPTYSRC   = lha/emptyfile $(D)emptyfile $(INC)clib/emptyfile $(INC)libraries/emptyfile $(INC)pragmas/emptyfile $(GS)pragmas/emptyfile
  68.  
  69. PREFSSRC  = $(PS)EditPrefs.c $(PA)EditPrefs.arb $(PA)EditPrefs_rxif.c $(PA)EditPrefs_rxcl.c $(PA)EditPrefs.c $(PA)EditPrefs.h
  70.  
  71. GUISRC    = $(GS)RunMPGui.c $(GS)MPGui.c $(GS)Hook.c $(GS)MPGui.h $(GS)MPGui.fd $(GS)clib/MPGui_Protos.h $(GS)libraries/MPGui.h $(GS)pragmas.edit
  72.  
  73. DEMOSRC   = $(DE)SnoopDos-prefs $(DE)SnoopDos-prefs$(I) Demo$(I) $(G)SnoopDos.def $(G)SnoopDos.gui $(G)Test.gui $(DE)Test $(DE)Test$(I) 
  74.  
  75. FULLSRC   = $(COMMONSRC) $(DOCSRC) $(EMPTYSRC) $(PREFSSRC) $(GUISRC) $(DEMOSRC) MPGui.guide$(I) Read.me
  76.  
  77. PREFSOBJ  = $(PS)EditPrefs.o $(OS)sprintf.o $(PA)EditPrefs.o $(PA)EditPrefs_rxcl.o $(PA)EditPrefs_rxif.o
  78.  
  79. GUIOBJ000 = $(GS)MPGui.o $(GS)Hook.o
  80.  
  81. #stuff to delete
  82. DELETE    = \#?/\#?.o \#?/\#?/\#?.o \#?/\#?.ld EditPrefs \
  83.  $(GS)RunMPGui RunMPGui MPGui.library $(GS)MPGui.library $(GS)pragmas/MPGui_pragmas.h\
  84.  EditPrefs-rexx EditPrefs.guide\
  85.  $(IGDIST) $(DGDIST)
  86.  
  87. # Default is to generate Source and Object lha
  88. Everything: lha/MPGui50.lha lha/MPGui50s.lha
  89.  
  90. # Delete all the built files (except two above) to force a recompile
  91. Delete:
  92.    -delete $(DELETE)
  93.  
  94. # MPGui lha distribution
  95. lha/MPGui50.lha: $(MPGUIDIST)
  96.     -delete lha/MPGui50.lha
  97.     lha -a -F u -x lha/MPGui50.lha <@<
  98.     $(MPGUIDIST)
  99.     <
  100.  
  101. # Source distribution - compressed lha archive
  102. lha/MPGui50s.lha: $(FULLSRC)
  103.     -delete lha/MPGui50s.lha
  104.    lha -a -F u -x lha/MPGui50s.lha <@<
  105.     $(FULLSRC)
  106.     <
  107.  
  108. #Includes
  109. $(INC)libraries/MPGui.h: $(GS)libraries/MPGui.h
  110.     copy $(GS)libraries/MPGui.h $(INC)libraries/MPGui.h
  111.  
  112. $(INC)clib/MPGui_protos.h: $(GS)clib/MPGui_protos.h
  113.     copy $(GS)clib/MPGui_protos.h $(INC)clib/MPGui_protos.h
  114.  
  115. $(INC)pragmas/MPGui_pragmas.h: $(GS)pragmas/MPGui_pragmas.h
  116.     copy $(GS)pragmas/MPGui_pragmas.h $(INC)pragmas/MPGui_pragmas.h
  117.  
  118. #autodocs
  119. $(D)MPGui.doc: $(GS)MPGui.c $(GS)RunMPGui.c
  120.     makedoc $(GS)MPGui.c $(GS)RunMPGui.c noicon toc autodoc $(D)MPGui.doc
  121.  
  122. # Rexx docs
  123. EditPrefs-rexx: $(PA)EditPrefs_rxif.c
  124.     makedoc $(PA)EditPrefs_rxif.c noicon toc amigaguide noformfeed autodoc EditPrefs-rexx
  125.  
  126. # guide file using MakeInfo
  127. EditPrefs.guide: $(DS)EditPrefs.texi
  128.    Makeinfo --amiga-39 -o EditPrefs.guide $(DS)EditPrefs.texi
  129.  
  130. MPGui.guide: $(DS)MPGui.texi
  131.    Makeinfo --amiga-39 -o MPGui.guide $(DS)MPGui.texi
  132.  
  133. # MPGui stuff
  134. $(GS)RunMPGui.ld: $(GS)RunMPGui.c $(INC)pragmas/MPGui_pragmas.h $(INC)clib/MPGui_protos.h $(INC)libraries/MPGui.h $(OS)sprintf.o
  135.     sc $(CCFLAGS000) link $(GS)RunMPGui.c $(OS)sprintf.o to $(GS)RunMPGui.ld
  136.  
  137. RunMPGui: $(GS)RunMPGui.ld
  138.     slink from $(GS)RunMPGui.ld to RunMPGui stripdebug noicons
  139.  
  140. $(GS)MPGui.library: $(GUIOBJ000)
  141.     sc $(CCFLAGSLG000) "linkopt=LIBID MPGui.library addsym VERBOSE" STARTUP=libinitr TO $(GS)MPGui.library link LIBFD $(GS)MPGui.fd LIBVERSION 5 LIBREVISION 0 $(GUIOBJ000)
  142.  
  143. MPGui.library: $(GS)MPGui.library
  144.     slink from $(GS)MPGui.library to MPGui.library stripdebug noicons
  145.  
  146. $(GS)pragmas/MPGui_pragmas.h: $(GS)MPGui.fd $(GS)pragmas.edit
  147.     fd2pragma $(GS)MPGui.fd $(GS)pragmas/MPGui_pragmas.h
  148.     ed $(GS)pragmas/MPGui_pragmas.h with $(GS)pragmas.edit
  149.  
  150. $(GS)MPGui.o: $(GS)MPGui.c $(GS)libraries/MPGui.h $(GS)MPGui.h
  151.     sc $(CCFLAGSLG000) $*.c
  152.  
  153. $(GS)Hook.o: $(GS)Hook.c $(GS)MPGui.h
  154.     sc $(CCFLAGSLG000) $*.c
  155.  
  156. # EditPrefs debug object
  157. $(PS)EditPrefs.ld: $(PREFSOBJ)
  158.    slink <WITH <
  159.    FROM lib:c.o $(PREFSOBJ)
  160.    LIBRARY lib:sc.lib LIB:amiga.lib
  161.    TO $(PS)EditPrefs.ld SC SD BATCH
  162.    VERBOSE
  163.     ADDSYM
  164.    DEFINE @__chkabort=@__dummy
  165.    <
  166.  
  167. # non debug object
  168. EditPrefs: $(PS)EditPrefs.ld
  169.    slink $(PS)EditPrefs.ld to EditPrefs STRIPDEBUG NOICONS
  170.  
  171. $(PS)EditPrefs.o: $(PS)EditPrefs.c $(INC)pragmas/MPGui_pragmas.h $(INC)clib/MPGui_protos.h $(INC)libraries/MPGui.h\
  172.  $(PA)EditPrefs.h
  173.  
  174. # ARexxBoxStuff
  175. $(PA)EditPrefs_rxcl.c: $(PA)EditPrefs.arb
  176.    echo "Use ARexxBox to regenerate EditPrefs ARexx source"
  177.    Fault 10
  178.  
  179. # ARexxBox does not regenerate the .c file so setdate it if the header has changed
  180. $(PA)EditPrefs.c: $(PA)EditPrefs.h
  181.    setdate $(PA)EditPrefs.c
  182.  
  183. $(PA)EditPrefs.h: $(PA)EditPrefs.arb
  184.    echo "Use ARexxBox to regenerate EditPrefs ARexx source"
  185.    Fault 10
  186.  
  187. $(PA)EditPrefs.o: $(PA)EditPrefs.c $(PA)EditPrefs.h
  188.    sc $(CCFLAGS000) IGN=178 $*.c
  189.  
  190. $(PA)EditPrefs_rxcl.o: $(PA)EditPrefs_rxcl.c $(PA)EditPrefs.h
  191.  
  192. $(PA)EditPrefs_rxif.o: $(PA)EditPrefs_rxif.c $(PA)EditPrefs.h $(INC)pragmas/MPGui_pragmas.h $(INC)clib/MPGui_protos.h $(INC)libraries/MPGui.h
  193.